<%@ page language="java" pageEncoding="UTF-8"%>
<%@ include file="/WEB-INF/jsp/common/common.jsp"%>
<!DOCTYPE html>
<html lang="zh-CN">
  <head>
    <link href="${pageContext.request.contextPath}/resource/css/def/ztree/metro.css" rel="stylesheet">
  	<link href="${pageContext.request.contextPath}/resource/css/def/bootstrap/ace/ace-part2.min.css" rel="stylesheet">
  	<link href="${pageContext.request.contextPath}/resource/css/def/bootstrap/ace/ace.css" rel="stylesheet">
  	<link href="${pageContext.request.contextPath}/resource/css/def/frm/common/common.css" rel="stylesheet">
  	<script src="${pageContext.request.contextPath}/resource/js/jquery/plugin/handlebars-v3.0.1.js"></script>
  	<script src="${pageContext.request.contextPath}/resource/js/bootstrap/validator/bootstrapValidator.js"></script>
  	 <link href="${pageContext.request.contextPath}/resource/css/def/datatables/css/jquery.dataTables.min.css" rel="stylesheet">
  	<!-- 新增 -->
  	 <link href="${pageContext.request.contextPath}/resource/css/index.css" rel="stylesheet">
  	 <script src="${prcs}/js/jquery/plugin/My97DatePicker/WdatePicker.js"></script>
     <script type="text/javascript" src="${pageContext.request.contextPath}/resource/js/jquery/plugin/jquery.ztree.all-3.5.min.js"></script>
     <script type="text/javascript" src="${pageContext.request.contextPath}/resource/js/frm/sys/disOrgTree.js"></script>
  </head>
<script type="text/javascript">
$(function(){
	var selectType = "${selectType}";
	if (selectType=="1"){
		$("#selLabel").html("核验身份证");
		$("#colDiv").html("核验身份证");
	}
	// 加载表格
	searchTable = $("#searchTable").DataTable(dataTableConfig);
});
// 后面构建btn 代码
var btnModel = '    \
	{{#each func}}\
    <button type="button" class="btn btn-{{this.type}} btn-sm" onclick="{{this.fn}}">{{this.name}}</button>\
    {{/each}}';
var template = Handlebars.compile(btnModel);
var searchTable;
// 表格配置信息
var dataTableConfig = {
	"ordering": false,// 排序
	"serverSide": true,// 开启服务器模式
	"scrollX": true,// 横向滚动
	ajax: {
        "type": "POST",
        "url":'searchData4Page.action',//请求路径
        "contentType": 'application/x-www-form-urlencoded; charset=UTF-8',
        "dataType":'json',
        "data":function(d){// 查询参数
        	d.num = $("#num").val();
        	return d;
        }
	},            
	columns: [// 对应列
		{"data": "num"}
    ],
    "columnDefs": [
		{// 所有列默认值
			"targets": "_all",
			"defaultContent": ''
		}
	]
	,"dom": 'rt<"bottom"ip><"clear">' //生成样式
};
// 查询
function serarch(){
	searchTable.ajax.reload();
}

</script>
  <body style="width:100%;padding-left:25px;font-size:14px;">
	<div class="main-content" style="background-color:#FFF">
	<div class="row">
		<form class="form-inline" method="post" id="sysDemoForm">
			<div class="form-group">
				<label id ="selLabel" for="name" >核验号码:</label>
				<input type="text" class="form-control" name="num"  size="30px" id="num">
			</div>
			<a type="button" class="btn btn-info" onclick="serarch();"><i class="ace-icon glyphicon glyphicon-search"></i>查询</a>
		</form>
	 </div>
	<hr>
	<div class="row">
		<table id="searchTable" class="display" cellspacing="0" width="100%">
			<thead>
				<tr>
					<th ><div id ="colDiv">核验号码</div></th>
				</tr>
			</thead>
		</table>
	</div>
</div>
		
</body>
</html>
